<style>
    .select2-container--krajee{
        width:220px!important;
    }
</style>
<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/5/17
 * Time: 14:30
 */

return [
    'id' => 'commentsInfo-form',
    'template' => 'form_default',
    'enableClientValidation' => false,
    'enableAjaxValidation' => true,
    'options' => [],
    'models' => [
        'commentsInfo' => [
            'title' => '评价项',
            'th_with' => 60,
            'elements' => [
                'valuator_type' => [
                    'label'=>'评价对象',
                    'type'=>'widget',
                    'class'=> \kartik\select2\Select2::className(),
                    'data' => [
                        '1'=>'学生',
                        '2'=>'老师',
                        '3'=>'教服总监',
                    ],
                    'options' => ['placeholder' => '请选择...'],
                ],
                'accepter_type' => [
                    'label'=>'被评价对象',
                    'type'=>'widget',
                    'class'=> \kartik\select2\Select2::className(),
                    'data' => [
                        '1'=>'学生',
                        '2'=>'老师',
                        '3'=>'教服总监',
                    ],
                    'options' => ['placeholder' => '请选择...'],
                ],
                'title' => [
                    'label'=>'标题',
                    'type' => 'text',
                    'options' => ['class' => 'input-text']
                ],
                'status'=>[
                    'label'=>'状态',
                    'type'=>'radiolist',
                    'items'=>[
                        '1'=>'正常',
                        '0'=>'关闭',
                    ]
                ],
                'description' => [
                    'label'=>'描述',
                    'type' => 'textarea',
                    'options' => ['class' => 'input-text']
                ]
            ],
        ]
    ]
];